import type { ProColumns } from '@ant-design/pro-table';
export type columnsDataType = {
    id: number,
    order: number,
    configurationDate: string
    serviceChargeNo: string,
    effectiveDate: string,
    expirationDate: string,
    state: string,
    rate: string,
    chargeAmount: string,
    maxChargeAmount: string,
};
const columnsData: ProColumns<columnsDataType>[] = [
    
    // 配置搜索框
    {
        title: '手续费编号',
        dataIndex: 'serviceChargeNo',
        hideInTable:true,
    },
    {
        title: '状态',
        dataIndex: 'state',
        valueType: 'select',
        hideInTable:true,
        valueEnum: {
            all: { text: '全部', status: 'Default' },
            open: {
                text: '失效',
                status: 'Error',
            },
            closed: {
                text: '生效',
                status: 'Success',
            },
            processing: {
                text: '未生效',
                status: 'Processing',
            },
        },
    },
    {
        title: '配置日期',
        dataIndex: 'configurationDate',
        valueType: 'dateRange',
        colSize: 1,
        hideInTable:true,
        search: {
            transform: (value) => {
                return {
                    startTime: value[0],
                    endTime: value[1],
                };
            },
        },
    },
    {
        title: '生效时间',
        dataIndex: 'effectiveDate',
        colSize: 1,
        valueType: 'dateRange',
        hideInTable:true,
        search: {
            transform: (value) => {
                return {
                    startTime: value[0],
                    endTime: value[1],
                };
            },
        },
    },
   
    // table里面的内容
    {
        title: '序号',
        dataIndex: 'order',
        valueType: 'indexBorder',
    },
    {
        title: '配置日期',
        dataIndex: 'configurationDate',
        hideInSearch:true,
    },
    {
        title: '手续费编号',
        dataIndex: 'serviceChargeNo',
        hideInSearch:true,
    },
    {
        title: '生效时间',
        dataIndex: 'effectiveDate',
        colSize: 1.5,
        hideInSearch:true,
    },
    {
        title: '失效时间',
        dataIndex: 'expirationDate',
        hideInSearch: true,
        valueType: 'dateRange',
    },
    {
        title: '状态',
        dataIndex: 'state',
        valueType: 'select',
        hideInSearch:true,
    },
    {
        title: '费率/笔',
        hideInSearch: true,
        dataIndex: 'rate',
    },
    {
        title: '手续费',
        hideInSearch: true,
        dataIndex: 'chargeAmount',
    },
    {
        title: '最高手续费',
        hideInSearch: true,
        dataIndex: 'maxChargeAmount',
    },
    {
        title: '备注',
        hideInSearch: true,
        dataIndex: 'remarks',
    },
    {
        title: '操作',
        hideInSearch: true,
        dataIndex: 'action',
    },
];

export default columnsData;
